package com.neborosoft.lib.collections.list;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Project: FlyingDog
 * User: stikhonenko
 * Date: 12/10/12
 * Time: 5:39 PM
 */
public class ListConcatenation<T> extends BasicListConcatenation<T>{
    private List<List<T>> lists = new ArrayList<List<T>>();

    public ListConcatenation(List<List<T>> lists) {
        this.lists = lists;
    }

    public ListConcatenation() {

    }

    public ListConcatenation(List<T>... lists){
        this.lists = Arrays.asList(lists);
    }

    public List<List<T>> getLists() {
        return lists;
    }

    public void setLists(List<List<T>> lists) {
        this.lists = lists;
    }

    @Override
    protected List<T> getList(int index) {
        return lists.get(index);
    }

    @Override
    protected int getListsCount() {
        return lists.size();
    }

    public void addList(List<T> list){
        lists.add(list);
    }
}
